﻿namespace ERP_RORZE_SYSTEM
{
    public static class ModuleWaitDialog
    {
        private static DevExpress.Utils.WaitDialogForm dlg = null;
        public static void CreateWaitDialog(string Caption = "", string Title = "")
        {
            if (string.IsNullOrEmpty(Title))
            {
                dlg = new DevExpress.Utils.WaitDialogForm(Caption);
            }
            else
            {
                dlg = new DevExpress.Utils.WaitDialogForm(Caption, Title);
            }
        }
        public static void CloseWaitDialog()
        {
            if (dlg != null)
            {
                dlg.Close();
            }
        }
        public static void SetWaitDialogCaption(string fCaption)
        {
            if (dlg != null)
            {
                dlg.Caption = fCaption;
            }
        }
    }
}
